home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / manage / snmp / mit / doc / snmpget.tex < prev    next >
Encoding:
Text File  |  1991-05-17  |  2.1 KB  |  67 lines

  1. %
  2. %    $Header: snmpget.tex,v 3.0 91/05/17 16:16:09 jrd Rel $
  3. %    Author: J. Davin
  4. %    Copyright 1988, 1989, Massachusetts Institute of Technology
  5. %
  6.  
  7. \newpage
  8. \subsection{The Snmpget Command}
  9.  
  10. The snmpget command initiates a network management
  11. query to remote management agent and displays the
  12. response. It is coded to run in a BSD 4.3 UNIX environment.
  13.  
  14. The code for the snmpget command illustrates the use of the
  15. Development Kit to accelerate development
  16. of network management applications as well as the
  17. use of the SNMP protocol {\it get} operation.
  18.  
  19. Sources for the snmpget command reside in the
  20. \verb"snmpget" subdirectory of the Development Kit
  21. distribution hierarchy.
  22.  
  23. The snmpget command attempts to retrieve and display the
  24. items of management information named on the command line
  25. according to the conventions of RFC 1067.
  26. It is invoked with the syntax:
  27.  
  28. {\bf snmpget} [{\bf -h} {\it remoteHost}] [{\bf -p} {\it remotePort}]
  29. [{\bf -c} {\it communityName}]
  30. [{\bf -t} {\it timeout}]
  31. [{\bf -i} {\it requestId}]
  32. [{\it name} ] $\ldots$
  33.  
  34. If the {\bf -h} flag is present, then the program
  35. will send its management request
  36. to the IP address specified as {\it remoteHost.}
  37.  
  38. If the {\bf -p} flag is present, then the program
  39. will send its management request
  40. to the UDP port specified as {\it remotePort,}
  41. instead of that assigned to the ``snmp'' service
  42. in the \verb"/etc/services" database.
  43.  
  44. If the {\bf -c} flag is present, then the program
  45. will generate and accept management requests
  46. associated with the community name specified as {\it communityName,}
  47. instead of using the community name ``public.''
  48.  
  49. If the {\bf -i} flag is present, then the program
  50. will identify its management request by
  51. the number specified as {\it requestId,}
  52. instead of using the value zero.
  53.  
  54. If the {\bf -t} flag is present, then the program
  55. will terminate after the number of seconds
  56. specified as {\it timeout,}
  57. instead of waiting forever for a response from the
  58. remote agent.
  59.  
  60. For example, the command
  61.  
  62. snmpget -h anyhost 1.3.6.1.2.1.1.1.0 1.3.6.1.2.1.1.2.0
  63.  
  64. has the effect of displaying the \verb"sysDescr" and \verb"sysObjectId"
  65. values for the host named {\it anyhost.}
  66.  
  67.